<template>
  <el-table height="400" style="width: 100%" :data="studentData" >
    <el-table-column
        fixed="left"
        prop="SID"
        label="学生编号"></el-table-column>
    <el-table-column
        label="学生姓名"
        prop="SNAME"></el-table-column>
    <el-table-column
        prop="REGTIME"
        label="报名时间"></el-table-column>
    <el-table-column
        prop="PAIDAMOUNT"
        label="交款额"></el-table-column>
    <el-table-column
        prop="CNAME"
        label="所选科目"></el-table-column>
    <el-table-column
        label="课程表"><el-button plain>查看课程表</el-button></el-table-column>
  </el-table>

  <el-button type="primary" @click="addStudent = true">添加学生</el-button>
  <el-button type="primary">学生选课</el-button>
  <el-button type="primary" @click="deleteStudent = true">删除学生</el-button>

  <add-student-dialog v-bind:visible="addStudent"></add-student-dialog>
  <delete-student-dialog v-bind:visible="deleteStudent"></delete-student-dialog>
</template>

<script>
import {ref} from 'vue'
import AddStudentDialog from '../components/AddStudentDialog.vue'
import DeleteStudentDialog from "../components/DeleteStudentDialog.vue";
import {getData} from "../http/student";

export default {
  name: "StudentManage",
  components: {
    DeleteStudentDialog,
    AddStudentDialog
  },
  setup() {
    let addStudent = ref(false);
    let deleteStudent = ref(false);
    let studentData = getData();
    console.log(studentData.data)
    return {
      addStudent,
      deleteStudent,
      // studentData
    }
  }
}
</script>

<style scoped>

</style>
